class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: G = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

i.w = j
i.u = j
m.w = l
n.w = c
n.u = j
n.z = j
e.v = m
e.q = j
h.o = m
h.t = e
c.z = e
c.s = e
c.w = j
j.s = e
j.z = e
a.o = m
a.t = e
l.w = j
l.u = j
assert e.q.z.v.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: G = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

i.w = j
i.u = j
m.w = l
n.w = c
n.u = j
n.z = j
e.v = m
e.q = j
h.o = m
h.t = e
c.z = e
c.s = e
c.w = j
j.s = e
j.z = e
a.o = m
a.t = e
l.w = j
l.u = j
assert e.q.z.v.w.u.txt == "j"