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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: E = None
        self.u: A = None
        self.s: C = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.z: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.q: F = None
        self.v: C = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: E = None
        self.u: A = None
        self.s: C = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.z: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.q: F = None
        self.v: C = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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