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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: E = None
        self.r: B = None
        self.z: B = None
        self.v: B = None
        self.q: E = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: E = None
        self.r: B = None
        self.z: B = None
        self.v: B = None
        self.q: E = None
        self.x: C = None
        self.txt = txt

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

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