class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.p: E = None
        self.v: G = None
        self.t: A = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: H = None
        self.w: D = None
        self.q: H = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: C = None
        self.y: C = None
        self.u: H = None
        self.s: H = None
        self.p: B = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: B = None
        self.o: F = None
        self.u: C = None
        self.x: I = None
        self.t: I = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.p: E = None
        self.v: G = None
        self.t: A = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: H = None
        self.w: D = None
        self.q: H = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: C = None
        self.y: C = None
        self.u: H = None
        self.s: H = None
        self.p: B = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: B = None
        self.o: F = None
        self.u: C = None
        self.x: I = None
        self.t: I = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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