class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: C = None
        self.o: E = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: G = None
        self.w: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: G = None
        self.z: E = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: C = None
        self.o: E = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: G = None
        self.w: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: G = None
        self.z: E = None
        self.q: B = None
        self.txt = txt

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

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