class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.v: F = None
        self.z: D = None
        self.y: H = None
        self.q: H = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.v: A = None
        self.y: C = None
        self.o: E = None
        self.z: H = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.q: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: H = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.v: A = None
        self.y: C = None
        self.o: E = None
        self.z: H = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.q: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: H = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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