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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: C = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: E = None
        self.q: E = None
        self.s: J = None
        self.u: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: C = None
        self.w: H = None
        self.u: C = None
        self.v: C = None
        self.r: G = None
        self.t: H = None
        self.y: I = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: J = None
        self.y: H = None
        self.x: B = None
        self.w: J = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: C = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: E = None
        self.q: E = None
        self.s: J = None
        self.u: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: C = None
        self.w: H = None
        self.u: C = None
        self.v: C = None
        self.r: G = None
        self.t: H = None
        self.y: I = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: J = None
        self.y: H = None
        self.x: B = None
        self.w: J = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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