class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: C = None
        self.w: A = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: A = None
        self.y: C = None
        self.w: F = None
        self.t: D = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.w: D = None
        self.u: F = None
        self.s: C = None
        self.txt = txt

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

k = A("k")
n = B("n")
m = C("m")
h = D("h")
f = E("f")
d = F("d")
g = A("g")
j = B("j")
c = C("c")
i = C("i")

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: A = None
        self.y: C = None
        self.w: F = None
        self.t: D = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.w: D = None
        self.u: F = None
        self.s: C = None
        self.txt = txt

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

k = A("k")
n = B("n")
m = C("m")
h = D("h")
f = E("f")
d = F("d")
g = A("g")
j = B("j")
c = C("c")
i = C("i")

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