class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: J = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: I = None
        self.q: H = None
        self.p: H = None
        self.x: D = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: F = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

b = A("b")
j = B("j")
l = C("l")
c = D("c")
g = E("g")
n = F("n")
a = G("a")
e = H("e")
h = I("h")
i = J("i")

b.q = j
b.o = i
b.w = l
j.t = e
l.z = e
l.q = e
l.p = e
l.s = h
l.u = h
l.x = c
c.r = b
g.u = i
n.s = h
n.r = a
a.v = j
a.r = j
a.u = i
a.t = b
a.y = c
a.p = c
a.z = n
a.o = h
a.w = g
e.q = h
e.x = h
e.u = n
h.q = g
i.y = l
assert c.r.o.y.u.q.u.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: J = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: I = None
        self.q: H = None
        self.p: H = None
        self.x: D = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: F = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

b = A("b")
j = B("j")
l = C("l")
c = D("c")
g = E("g")
n = F("n")
a = G("a")
e = H("e")
h = I("h")
i = J("i")

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