class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: G = None
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: F = None
        self.x: D = None
        self.z: C = None
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.t: F = None
        self.o: A = None
        self.p: A = None
        self.s: A = None
        self.x: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: A = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: F = None
        self.x: D = None
        self.z: C = None
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.t: F = None
        self.o: A = None
        self.p: A = None
        self.s: A = None
        self.x: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: A = None
        self.t: G = None
        self.txt = txt

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

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