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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

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

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