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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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