class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: H = None
        self.t: E = None
        self.y: E = None
        self.p: H = None
        self.s: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: G = None
        self.z: C = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: B = None
        self.p: A = None
        self.s: D = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: G = None
        self.z: C = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: B = None
        self.p: A = None
        self.s: D = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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