class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.t: A = None
        self.z: A = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.q: E = None
        self.r: F = None
        self.t: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.q: E = None
        self.r: F = None
        self.t: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.txt = txt

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

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

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

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