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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.q: F = None
        self.w: E = None
        self.o: C = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.x: B = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: B = None
        self.r: D = None
        self.o: H = None
        self.z: H = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.q: F = None
        self.w: E = None
        self.o: C = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.x: B = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: B = None
        self.r: D = None
        self.o: H = None
        self.z: H = None
        self.w: D = None
        self.txt = txt

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

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