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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: B = None
        self.q: A = None
        self.w: F = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: B = None
        self.q: A = None
        self.w: F = None
        self.x: A = None
        self.txt = txt

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

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

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