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

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

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

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

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

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

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

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

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

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

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

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

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

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

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