class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: H = None
        self.y: C = None
        self.t: D = None
        self.z: G = None
        self.s: C = None
        self.v: D = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.p: F = None
        self.x: D = None
        self.t: F = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.s: E = None
        self.o: G = None
        self.p: A = None
        self.y: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.v: G = None
        self.t: D = None
        self.p: G = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.p: F = None
        self.x: D = None
        self.t: F = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.s: E = None
        self.o: G = None
        self.p: A = None
        self.y: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.v: G = None
        self.t: D = None
        self.p: G = None
        self.y: I = None
        self.txt = txt

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

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