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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: E = None
        self.w: G = None
        self.r: C = 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.p: A = None
        self.s: A = None
        self.y: G = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: E = None
        self.w: G = None
        self.r: C = 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.p: A = None
        self.s: A = None
        self.y: G = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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