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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: A = None
        self.p: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: E = None
        self.y: E = None
        self.r: E = None
        self.q: F = None
        self.z: D = None
        self.txt = txt

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

l = A("l")
k = B("k")
b = C("b")
f = D("f")
e = E("e")
m = F("m")
h = E("h")
i = F("i")

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: A = None
        self.p: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: E = None
        self.y: E = None
        self.r: E = None
        self.q: F = None
        self.z: D = None
        self.txt = txt

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

l = A("l")
k = B("k")
b = C("b")
f = D("f")
e = E("e")
m = F("m")
h = E("h")
i = F("i")

l.w = h
l.y = h
l.p = k
k.t = f
b.z = k
b.q = l
b.p = l
b.x = l
f.x = b
f.z = b
f.w = b
f.p = m
e.p = l
e.o = h
e.y = h
e.r = h
e.q = i
e.z = f
m.r = b
m.w = k
m.t = l
h.p = l
h.o = e
h.y = e
h.r = e
h.q = m
h.z = f
i.r = b
i.w = k
i.t = l
assert f.x.z.t.w.z.txt == "k"