class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: E = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.u: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

l = A("l")
j = B("j")
c = C("c")
b = D("b")
d = E("d")
k = F("k")
e = G("e")
m = D("m")
h = C("h")
g = B("g")

l.q = d
l.r = k
l.s = m
j.y = m
j.o = d
j.t = c
c.y = g
c.z = d
b.u = d
b.q = h
d.z = j
d.x = b
d.u = k
d.v = e
k.x = j
e.t = m
e.x = h
e.u = c
e.q = b
m.u = d
m.q = h
h.y = j
h.z = d
g.y = b
g.o = d
g.t = h
assert h.y.t.z.z.t.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: E = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.u: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

l = A("l")
j = B("j")
c = C("c")
b = D("b")
d = E("d")
k = F("k")
e = G("e")
m = D("m")
h = C("h")
g = B("g")

l.q = d
l.r = k
l.s = m
j.y = m
j.o = d
j.t = c
c.y = g
c.z = d
b.u = d
b.q = h
d.z = j
d.x = b
d.u = k
d.v = e
k.x = j
e.t = m
e.x = h
e.u = c
e.q = b
m.u = d
m.q = h
h.y = j
h.z = d
g.y = b
g.o = d
g.t = h
assert h.y.t.z.z.t.z.v.txt == "e"