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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.w: G = None
        self.q: G = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: E = None
        self.q: B = None
        self.s: A = None
        self.r: B = None
        self.u: C = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.w: C = None
        self.x: A = None
        self.o: D = None
        self.z: E = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.w: G = None
        self.q: G = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: E = None
        self.q: B = None
        self.s: A = None
        self.r: B = None
        self.u: C = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.w: C = None
        self.x: A = None
        self.o: D = None
        self.z: E = None
        self.v: B = None
        self.txt = txt

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

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