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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

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