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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.u: A = None
        self.z: A = None
        self.o: D = None
        self.p: G = None
        self.txt = txt

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

f = A("f")
d = B("d")
m = C("m")
k = D("k")
a = E("a")
g = F("g")
h = G("h")
j = A("j")
c = G("c")

f.v = j
f.w = j
f.q = a
f.x = m
f.s = m
d.r = c
d.u = k
d.s = a
m.o = a
m.z = a
m.x = k
k.w = a
k.o = a
k.p = g
a.r = g
a.u = k
a.y = j
a.z = f
g.y = h
g.p = h
g.q = c
g.u = j
g.z = f
g.o = k
h.t = m
h.o = m
h.s = a
h.r = f
j.v = f
j.w = f
j.q = a
j.x = m
j.s = m
c.t = m
c.o = m
c.s = a
c.r = j
assert k.p.q.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: E = None
        self.w: A = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.u: A = None
        self.z: A = None
        self.o: D = None
        self.p: G = None
        self.txt = txt

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

f = A("f")
d = B("d")
m = C("m")
k = D("k")
a = E("a")
g = F("g")
h = G("h")
j = A("j")
c = G("c")

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