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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: B = None
        self.t: F = None
        self.r: C = None
        self.p: B = None
        self.o: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: E = None
        self.o: B = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.z: D = None
        self.r: B = None
        self.u: B = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

l = A("l")
h = B("h")
e = C("e")
j = D("j")
m = E("m")
f = F("f")
k = G("k")
a = E("a")

l.w = h
l.s = h
l.z = a
h.o = j
h.x = j
h.z = f
h.w = m
e.w = a
e.t = a
j.x = h
j.s = h
j.p = h
j.t = f
j.o = f
j.r = e
j.q = e
m.v = a
m.z = a
m.o = h
m.q = f
f.z = h
f.x = k
f.o = e
k.w = j
k.z = j
k.s = j
k.t = e
k.p = e
k.r = h
k.u = h
a.v = m
a.z = m
a.o = h
a.q = f
assert k.u.x.t.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: B = None
        self.t: F = None
        self.r: C = None
        self.p: B = None
        self.o: F = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: E = None
        self.o: B = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.z: D = None
        self.r: B = None
        self.u: B = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

l = A("l")
h = B("h")
e = C("e")
j = D("j")
m = E("m")
f = F("f")
k = G("k")
a = E("a")

l.w = h
l.s = h
l.z = a
h.o = j
h.x = j
h.z = f
h.w = m
e.w = a
e.t = a
j.x = h
j.s = h
j.p = h
j.t = f
j.o = f
j.r = e
j.q = e
m.v = a
m.z = a
m.o = h
m.q = f
f.z = h
f.x = k
f.o = e
k.w = j
k.z = j
k.s = j
k.t = e
k.p = e
k.r = h
k.u = h
a.v = m
a.z = m
a.o = h
a.q = f
assert k.u.x.t.z.z.txt == "f"