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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: E = None
        self.s: B = None
        self.t: F = None
        self.z: A = None
        self.r: A = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.w: D = None
        self.t: G = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: E = None
        self.s: B = None
        self.t: F = None
        self.z: A = None
        self.r: A = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.w: D = None
        self.t: G = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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

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