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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: A = None
        self.s: F = None
        self.q: F = None
        self.t: C = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.p: E = None
        self.v: A = None
        self.u: A = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.y: H = None
        self.o: H = None
        self.w: F = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.q: C = None
        self.z: H = None
        self.s: H = None
        self.r: E = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: A = None
        self.s: F = None
        self.q: F = None
        self.t: C = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.p: E = None
        self.v: A = None
        self.u: A = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.y: H = None
        self.o: H = None
        self.w: F = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.q: C = None
        self.z: H = None
        self.s: H = None
        self.r: E = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.txt = txt

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

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