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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: H = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: H = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.s: D = None
        self.r: A = None
        self.w: H = None
        self.t: H = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: A = None
        self.t: B = None
        self.r: E = None
        self.p: A = None
        self.w: A = None
        self.txt = txt

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

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

e.t = l
e.s = l
e.v = b
e.w = b
e.p = n
e.z = f
e.u = a
e.o = c
l.v = h
l.p = h
l.u = b
j.t = l
j.u = f
j.q = d
f.o = j
f.t = c
h.z = l
h.y = b
h.t = j
a.v = f
a.s = f
a.y = l
a.r = n
a.w = b
a.t = b
a.q = e
c.y = d
c.u = d
c.p = d
c.t = l
c.r = h
c.w = n
b.t = f
d.t = l
d.s = l
d.v = b
d.w = b
d.p = e
d.z = f
d.u = a
d.o = c
n.t = l
n.s = l
n.v = b
n.w = b
n.p = d
n.z = f
n.u = a
n.o = c
assert l.u.t.t.t.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: H = None
        self.p: A = None
        self.z: D = None
        self.u: F = None
        self.w: H = None
        self.s: B = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: H = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: H = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.s: D = None
        self.r: A = None
        self.w: H = None
        self.t: H = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: A = None
        self.t: B = None
        self.r: E = None
        self.p: A = None
        self.w: A = None
        self.txt = txt

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

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

e.t = l
e.s = l
e.v = b
e.w = b
e.p = n
e.z = f
e.u = a
e.o = c
l.v = h
l.p = h
l.u = b
j.t = l
j.u = f
j.q = d
f.o = j
f.t = c
h.z = l
h.y = b
h.t = j
a.v = f
a.s = f
a.y = l
a.r = n
a.w = b
a.t = b
a.q = e
c.y = d
c.u = d
c.p = d
c.t = l
c.r = h
c.w = n
b.t = f
d.t = l
d.s = l
d.v = b
d.w = b
d.p = e
d.z = f
d.u = a
d.o = c
n.t = l
n.s = l
n.v = b
n.w = b
n.p = d
n.z = f
n.u = a
n.o = c
assert l.u.t.t.t.u.t.txt == "f"