class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: B = None
        self.v: F = None
        self.u: B = None
        self.w: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

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

f = A("f")
j = B("j")
g = C("g")
n = D("n")
d = E("d")
b = F("b")
k = E("k")
h = B("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

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

f = A("f")
j = B("j")
g = C("g")
n = D("n")
d = E("d")
b = F("b")
k = E("k")
h = B("h")

f.p = d
f.q = h
f.w = h
f.v = b
f.u = j
j.z = n
j.q = g
j.o = k
j.r = h
j.t = d
g.q = b
g.o = b
g.w = n
n.w = d
n.r = h
n.p = f
d.s = j
d.p = n
d.v = b
d.r = k
d.u = f
d.q = f
b.t = k
k.s = j
k.p = n
k.v = b
k.r = d
k.u = f
k.q = f
h.z = n
h.q = g
h.o = d
h.r = j
h.t = k
assert n.w.r.v.t.u.u.t.txt == "d"