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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: E = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.u: I = None
        self.v: A = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: G = None
        self.q: G = None
        self.y: C = None
        self.z: G = None
        self.v: G = None
        self.p: C = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: E = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.u: I = None
        self.v: A = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: G = None
        self.q: G = None
        self.y: C = None
        self.z: G = None
        self.v: G = None
        self.p: C = None
        self.s: E = None
        self.txt = txt

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

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