class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: A = None
        self.p: H = None
        self.o: E = None
        self.z: G = None
        self.y: I = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.y: B = None
        self.p: B = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: E = None
        self.x: C = None
        self.y: C = None
        self.r: D = None
        self.t: B = None
        self.txt = txt

b = A("b")
a = B("a")
j = C("j")
d = D("d")
f = E("f")
i = F("i")
g = G("g")
m = H("m")
l = I("l")
e = I("e")

b.r = l
b.w = l
a.p = g
a.r = d
a.y = d
a.z = j
j.p = b
j.u = b
j.o = d
j.t = d
j.q = d
j.w = i
j.r = i
d.u = f
d.o = f
d.t = b
d.p = m
d.z = g
d.y = e
d.r = e
f.w = b
f.t = i
f.x = m
f.y = m
f.p = j
f.s = a
f.o = a
i.u = f
i.y = g
g.r = a
g.y = a
g.p = a
g.s = a
g.t = a
g.q = m
m.x = d
m.o = b
m.p = b
m.z = i
m.t = i
m.v = f
m.y = f
m.q = j
m.w = l
l.v = e
l.u = f
l.x = j
l.y = j
l.r = d
l.t = a
e.v = l
e.u = f
e.x = j
e.y = j
e.r = d
e.t = a
assert d.o.w.w.y.w.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: A = None
        self.p: H = None
        self.o: E = None
        self.z: G = None
        self.y: I = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.y: B = None
        self.p: B = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: E = None
        self.x: C = None
        self.y: C = None
        self.r: D = None
        self.t: B = None
        self.txt = txt

b = A("b")
a = B("a")
j = C("j")
d = D("d")
f = E("f")
i = F("i")
g = G("g")
m = H("m")
l = I("l")
e = I("e")

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