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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: G = None
        self.u: G = None
        self.y: D = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: G = None
        self.u: G = None
        self.y: D = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

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

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

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

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