class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: D = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.y: B = None
        self.x: G = None
        self.v: I = None
        self.p: G = None
        self.s: B = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: F = None
        self.z: G = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: H = None
        self.p: F = None
        self.y: F = None
        self.r: H = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: C = None
        self.y: B = None
        self.x: B = None
        self.s: F = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: D = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.y: B = None
        self.x: G = None
        self.v: I = None
        self.p: G = None
        self.s: B = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: F = None
        self.z: G = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: H = None
        self.p: F = None
        self.y: F = None
        self.r: H = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: C = None
        self.y: B = None
        self.x: B = None
        self.s: F = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

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

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