class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.p: F = None
        self.x: C = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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