class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: E = None
        self.z: B = None
        self.t: G = None
        self.y: H = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: G = None
        self.p: C = None
        self.y: C = None
        self.x: H = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.t: A = None
        self.q: F = None
        self.w: D = None
        self.o: F = None
        self.y: F = None
        self.u: A = None
        self.txt = txt

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

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

i.r = d
i.y = d
i.w = f
i.q = f
i.z = j
i.t = e
j.o = e
n.t = f
b.z = e
f.w = b
f.v = e
f.o = e
f.p = n
f.y = n
f.x = d
c.r = n
c.x = n
c.z = b
c.o = b
c.q = i
e.r = h
e.p = n
e.t = i
e.u = i
e.q = c
e.o = c
e.y = c
e.w = b
h.t = n
h.r = j
d.t = n
d.r = j
assert h.r.o.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: E = None
        self.z: B = None
        self.t: G = None
        self.y: H = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: G = None
        self.p: C = None
        self.y: C = None
        self.x: H = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.t: A = None
        self.q: F = None
        self.w: D = None
        self.o: F = None
        self.y: F = None
        self.u: A = None
        self.txt = txt

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

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

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