class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: D = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.y: B = None
        self.u: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

b.z = i
b.y = m
b.u = e
b.x = l
f.v = h
f.u = l
e.t = c
e.q = f
e.w = f
e.z = h
e.v = d
e.s = b
e.o = l
m.q = b
m.p = d
m.y = l
m.u = f
m.v = c
c.y = d
i.o = c
i.s = f
h.p = c
h.z = e
l.v = h
l.u = f
d.q = b
d.p = m
d.y = l
d.u = f
d.v = c
assert e.t.y.p.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: D = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.y: B = None
        self.u: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

b.z = i
b.y = m
b.u = e
b.x = l
f.v = h
f.u = l
e.t = c
e.q = f
e.w = f
e.z = h
e.v = d
e.s = b
e.o = l
m.q = b
m.p = d
m.y = l
m.u = f
m.v = c
c.y = d
i.o = c
i.s = f
h.p = c
h.z = e
l.v = h
l.u = f
d.q = b
d.p = m
d.y = l
d.u = f
d.v = c
assert e.t.y.p.y.u.txt == "f"