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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: J = None
        self.v: E = None
        self.t: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: B = None
        self.p: C = None
        self.r: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: A = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: G = None
        self.s: E = None
        self.u: D = None
        self.r: C = None
        self.w: J = None
        self.t: A = None
        self.o: E = None
        self.q: C = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: J = None
        self.v: E = None
        self.t: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: B = None
        self.p: C = None
        self.r: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: A = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: G = None
        self.s: E = None
        self.u: D = None
        self.r: C = None
        self.w: J = None
        self.t: A = None
        self.o: E = None
        self.q: C = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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