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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.y: D = None
        self.r: A = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: C = None
        self.v: B = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.y: D = None
        self.r: A = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: C = None
        self.v: B = None
        self.w: A = None
        self.txt = txt

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

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