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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: A = None
        self.y: A = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: F = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: D = None
        self.t: G = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.o: F = None
        self.y: G = None
        self.t: D = None
        self.x: F = None
        self.u: G = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: A = None
        self.y: A = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: F = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: D = None
        self.t: G = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.o: F = None
        self.y: G = None
        self.t: D = None
        self.x: F = None
        self.u: G = None
        self.q: H = None
        self.txt = txt

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

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

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

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