class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: F = None
        self.x: E = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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