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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: F = None
        self.p: A = None
        self.x: E = None
        self.r: C = None
        self.v: I = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: G = None
        self.s: D = None
        self.p: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.r: H = None
        self.s: H = None
        self.p: B = None
        self.y: F = None
        self.t: D = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: I = None
        self.z: G = None
        self.q: D = None
        self.o: B = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.x: E = None
        self.o: B = None
        self.w: G = None
        self.r: F = None
        self.p: A = None
        self.u: I = None
        self.v: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: F = None
        self.p: A = None
        self.x: E = None
        self.r: C = None
        self.v: I = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: G = None
        self.s: D = None
        self.p: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.r: H = None
        self.s: H = None
        self.p: B = None
        self.y: F = None
        self.t: D = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: I = None
        self.z: G = None
        self.q: D = None
        self.o: B = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.x: E = None
        self.o: B = None
        self.w: G = None
        self.r: F = None
        self.p: A = None
        self.u: I = None
        self.v: I = None
        self.txt = txt

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

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

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