class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: H = None
        self.w: D = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.t: F = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.s: E = None
        self.z: I = None
        self.txt = txt

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

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

a = A("a")
j = B("j")
e = C("e")
m = D("m")
d = E("d")
k = F("k")
g = G("g")
l = H("l")
i = I("i")
c = J("c")

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.t: F = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.s: E = None
        self.z: I = None
        self.txt = txt

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

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

a = A("a")
j = B("j")
e = C("e")
m = D("m")
d = E("d")
k = F("k")
g = G("g")
l = H("l")
i = I("i")
c = J("c")

a.t = l
a.x = l
a.p = l
a.w = m
j.r = e
j.u = k
j.t = k
j.q = g
e.w = g
m.v = i
m.w = a
d.v = j
d.q = j
d.r = g
d.w = g
d.s = e
d.o = k
d.t = a
d.u = l
k.w = l
g.p = l
g.z = e
l.x = k
l.p = a
l.s = d
l.z = i
i.o = d
c.x = e
assert j.t.w.p.p.x.w.txt == "l"