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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: A = None
        self.v: C = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: A = None
        self.v: C = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.y: E = None
        self.txt = txt

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

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

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

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