class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: B = None
        self.txt = txt

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

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

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

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