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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: F = None
        self.t: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: F = None
        self.t: C = None
        self.o: A = None
        self.txt = txt

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

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