class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: B = None
        self.x: B = None
        self.y: F = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

e = A("e")
g = B("g")
j = C("j")
h = D("h")
l = E("l")
c = F("c")
k = G("k")
i = H("i")
f = I("f")

e.t = g
e.p = f
e.v = k
g.z = f
j.s = l
j.q = k
h.v = i
h.s = g
h.x = g
h.y = c
h.r = k
l.o = j
l.u = k
c.w = h
k.w = c
k.s = g
i.z = g
i.x = l
f.q = k
assert e.p.q.s.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: B = None
        self.x: B = None
        self.y: F = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

e = A("e")
g = B("g")
j = C("j")
h = D("h")
l = E("l")
c = F("c")
k = G("k")
i = H("i")
f = I("f")

e.t = g
e.p = f
e.v = k
g.z = f
j.s = l
j.q = k
h.v = i
h.s = g
h.x = g
h.y = c
h.r = k
l.o = j
l.u = k
c.w = h
k.w = c
k.s = g
i.z = g
i.x = l
f.q = k
assert e.p.q.s.z.q.txt == "k"