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

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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