class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: H = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.q: I = None
        self.u: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: F = None
        self.p: D = None
        self.v: E = None
        self.s: F = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.q: I = None
        self.u: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: F = None
        self.p: D = None
        self.v: E = None
        self.s: F = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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