class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: F = None
        self.x: D = None
        self.o: F = None
        self.q: F = None
        self.w: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: D = None
        self.o: G = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: D = None
        self.o: G = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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