class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.y: H = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: F = None
        self.v: B = None
        self.p: J = None
        self.w: J = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.s: E = None
        self.v: I = None
        self.w: J = None
        self.o: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: F = None
        self.v: B = None
        self.p: J = None
        self.w: J = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.s: E = None
        self.v: I = None
        self.w: J = None
        self.o: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: E = None
        self.txt = txt

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

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