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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.r: B = None
        self.y: E = None
        self.w: F = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: B = None
        self.p: A = None
        self.r: F = None
        self.v: C = None
        self.t: B = None
        self.q: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.r: B = None
        self.y: E = None
        self.w: F = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: B = None
        self.p: A = None
        self.r: F = None
        self.v: C = None
        self.t: B = None
        self.q: E = None
        self.txt = txt

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

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