class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: B = None
        self.v: D = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: E = None
        self.x: A = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: A = None
        self.v: E = None
        self.z: B = None
        self.t: C = None
        self.u: C = None
        self.txt = txt

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

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

n = A("n")
d = B("d")
i = C("i")
h = D("h")
c = E("c")
j = F("j")
g = B("g")
l = F("l")
a = C("a")
b = B("b")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: E = None
        self.x: A = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: A = None
        self.v: E = None
        self.z: B = None
        self.t: C = None
        self.u: C = None
        self.txt = txt

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

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

n = A("n")
d = B("d")
i = C("i")
h = D("h")
c = E("c")
j = F("j")
g = B("g")
l = F("l")
a = C("a")
b = B("b")

n.p = h
n.v = h
n.r = g
n.x = l
d.w = j
d.v = j
d.s = c
d.x = n
i.z = h
i.r = l
h.r = i
h.t = i
h.x = n
h.v = c
h.z = d
h.u = a
c.t = l
j.x = h
j.z = h
j.w = i
j.t = l
j.u = l
j.q = c
g.w = j
g.s = c
g.x = n
g.v = l
l.x = h
l.z = h
l.w = a
l.t = j
l.u = j
l.q = c
a.z = h
a.r = l
b.w = j
b.s = c
b.x = n
b.v = l
assert a.z.x.r.s.t.u.t.x.txt == "h"