class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.r: F = None
        self.v: F = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.u: E = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.y: C = None
        self.r: C = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.u: E = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.y: C = None
        self.r: C = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

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

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

a.p = j
a.y = n
a.r = b
a.v = b
a.w = g
a.o = c
j.o = b
j.w = f
j.z = c
j.p = c
j.q = n
c.s = j
c.z = n
c.x = a
c.p = a
f.z = g
f.o = g
f.u = k
f.y = j
h.p = j
h.o = j
h.u = j
h.y = c
h.r = c
h.x = b
n.r = j
n.z = f
n.y = a
k.p = j
k.o = j
k.u = j
k.y = c
k.r = c
k.x = n
b.r = j
b.z = f
b.y = a
g.p = j
g.o = j
g.u = j
g.y = c
g.r = c
g.x = n
assert c.z.r.z.s.z.s.txt == "j"