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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.q: A = None
        self.x: D = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.o: A = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.q: A = None
        self.x: D = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.o: A = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.s: F = None
        self.txt = txt

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

h.r = e
h.w = m
h.q = m
h.v = g
h.t = l
l.p = e
l.w = g
l.q = g
l.s = g
l.x = f
j.t = n
j.v = n
j.p = c
f.s = j
m.z = d
m.v = e
m.o = h
m.u = c
m.x = l
d.u = g
d.p = j
d.s = n
e.p = l
e.w = h
e.q = h
e.s = h
e.x = f
c.z = d
c.v = l
c.o = h
c.u = m
c.x = e
g.r = e
g.w = c
g.q = m
g.v = h
g.t = l
n.u = h
n.p = j
n.s = d
assert n.p.t.p.t.u.q.z.txt == "d"