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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.v: H = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.v: H = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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