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

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.r: C = None
        self.o: B = None
        self.s: D = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: G = None
        self.y: C = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.r: C = None
        self.o: B = None
        self.s: D = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: G = None
        self.y: C = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: B = None
        self.txt = txt

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

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