class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: E = None
        self.q: D = None
        self.z: E = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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