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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.t: F = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.o: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: B = None
        self.t: C = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

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

e = A("e")
f = B("f")
h = C("h")
n = D("n")
d = E("d")
b = F("b")
m = G("m")
i = H("i")
k = C("k")

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.t: F = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.o: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: B = None
        self.t: C = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

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

e = A("e")
f = B("f")
h = C("h")
n = D("n")
d = E("d")
b = F("b")
m = G("m")
i = H("i")
k = C("k")

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