class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.y: G = None
        self.w: E = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: E = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: A = None
        self.s: H = None
        self.x: C = None
        self.y: A = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: E = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: A = None
        self.s: H = None
        self.x: C = None
        self.y: A = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

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

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

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