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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.v: E = None
        self.u: C = None
        self.r: D = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.txt = txt

a = A("a")
i = B("i")
h = C("h")
e = D("e")
j = E("j")
b = F("b")
l = G("l")
f = F("f")
m = C("m")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.v: E = None
        self.u: C = None
        self.r: D = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.txt = txt

a = A("a")
i = B("i")
h = C("h")
e = D("e")
j = E("j")
b = F("b")
l = G("l")
f = F("f")
m = C("m")

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