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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: A = None
        self.r: B = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: A = None
        self.r: B = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

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

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

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

c.o = i
c.w = n
c.z = g
k.u = b
k.x = j
k.v = l
g.y = n
g.v = c
g.q = c
g.r = d
n.w = g
n.r = c
n.t = i
n.z = b
i.x = j
i.r = l
i.z = k
l.x = g
l.o = g
j.u = n
j.x = k
j.v = l
d.u = n
d.x = k
d.v = l
b.w = g
b.r = c
b.t = i
b.z = n
assert j.v.x.q.z.y.txt == "n"