class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.t: C = None
        self.z: B = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.x: A = None
        self.y: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.x: A = None
        self.y: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

f.x = g
f.r = k
f.t = m
f.z = e
f.p = e
c.o = m
m.u = g
m.v = n
m.x = f
m.z = f
m.y = k
n.r = f
i.w = b
i.o = n
i.s = k
i.y = m
i.p = f
i.r = f
g.x = f
g.r = n
b.w = i
b.o = n
b.s = m
b.y = k
b.p = f
b.r = f
e.o = m
k.u = g
k.v = n
k.x = f
k.z = f
k.y = m
assert m.y.u.r.r.r.v.r.r.txt == "k"