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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: B = None
        self.q: C = None
        self.z: E = None
        self.p: F = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: A = None
        self.v: C = None
        self.p: C = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: B = None
        self.q: C = None
        self.z: E = None
        self.p: F = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: A = None
        self.v: C = None
        self.p: C = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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