class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: C = None
        self.z: F = None
        self.w: F = None
        self.p: C = None
        self.q: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.w: B = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: A = None
        self.v: E = None
        self.q: C = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.w: B = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: A = None
        self.v: E = None
        self.q: C = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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