class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: J = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.w: A = None
        self.r: B = None
        self.t: J = None
        self.q: F = None
        self.z: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.r: A = None
        self.x: E = None
        self.v: B = None
        self.q: E = None
        self.t: A = None
        self.z: I = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: G = None
        self.z: E = None
        self.w: C = None
        self.q: E = None
        self.x: C = None
        self.y: A = None
        self.p: C = None
        self.o: H = None
        self.r: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: J = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.w: A = None
        self.r: B = None
        self.t: J = None
        self.q: F = None
        self.z: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: G = None
        self.r: A = None
        self.x: E = None
        self.v: B = None
        self.q: E = None
        self.t: A = None
        self.z: I = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: G = None
        self.z: E = None
        self.w: C = None
        self.q: E = None
        self.x: C = None
        self.y: A = None
        self.p: C = None
        self.o: H = None
        self.r: E = None
        self.txt = txt

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

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