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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: A = None
        self.u: D = None
        self.t: B = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.w: G = None
        self.r: B = None
        self.u: D = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: B = None
        self.v: D = None
        self.w: A = None
        self.z: C = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: A = None
        self.u: D = None
        self.t: B = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.w: G = None
        self.r: B = None
        self.u: D = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: B = None
        self.v: D = None
        self.w: A = None
        self.z: C = None
        self.o: H = None
        self.txt = txt

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

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

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