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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

g = A("g")
e = B("e")
d = C("d")
n = D("n")
j = E("j")
a = F("a")
l = G("l")
c = H("c")
k = E("k")

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

g = A("g")
e = B("e")
d = C("d")
n = D("n")
j = E("j")
a = F("a")
l = G("l")
c = H("c")
k = E("k")

g.p = n
g.y = c
g.w = c
g.v = a
g.x = l
g.o = l
g.s = d
e.v = j
d.s = l
d.o = l
d.q = k
n.r = d
n.p = d
n.y = l
n.u = l
n.w = e
n.q = e
n.s = k
j.q = c
a.o = g
a.x = l
a.t = l
a.y = n
a.s = c
a.u = c
a.r = k
a.v = k
l.r = d
l.x = k
l.u = c
c.t = n
c.x = d
c.y = a
c.r = g
k.q = c
assert g.s.o.x.q.txt == "c"