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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: F = None
        self.z: E = None
        self.w: B = None
        self.s: E = None
        self.q: E = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: F = None
        self.z: E = None
        self.w: B = None
        self.s: E = None
        self.q: E = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

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

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

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