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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: D = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: D = None
        self.q: B = None
        self.o: E = None
        self.x: C = None
        self.r: D = None
        self.w: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: D = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: D = None
        self.q: B = None
        self.o: E = None
        self.x: C = None
        self.r: D = None
        self.w: E = None
        self.txt = txt

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

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