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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.u: E = None
        self.s: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: F = None
        self.t: C = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: D = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

l = A("l")
j = B("j")
i = C("i")
n = D("n")
e = E("e")
c = F("c")
d = G("d")
h = B("h")

l.x = j
l.z = e
l.o = e
j.z = i
j.r = c
j.u = e
j.s = h
i.w = h
i.r = e
i.x = j
n.r = c
e.z = c
e.x = c
e.t = i
e.s = n
c.s = d
d.s = l
d.t = l
d.w = n
d.q = i
h.z = i
h.r = c
h.u = e
h.s = j
assert d.s.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.u: E = None
        self.s: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: F = None
        self.t: C = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: D = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

l = A("l")
j = B("j")
i = C("i")
n = D("n")
e = E("e")
c = F("c")
d = G("d")
h = B("h")

l.x = j
l.z = e
l.o = e
j.z = i
j.r = c
j.u = e
j.s = h
i.w = h
i.r = e
i.x = j
n.r = c
e.z = c
e.x = c
e.t = i
e.s = n
c.s = d
d.s = l
d.t = l
d.w = n
d.q = i
h.z = i
h.r = c
h.u = e
h.s = j
assert d.s.z.t.txt == "i"