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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: D = None
        self.s: B = None
        self.z: C = None
        self.p: D = None
        self.x: G = None
        self.o: G = None
        self.txt = txt

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

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

d = A("d")
n = B("n")
b = C("b")
m = D("m")
l = E("l")
i = F("i")
a = G("a")
h = D("h")
j = C("j")
k = E("k")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: D = None
        self.s: B = None
        self.z: C = None
        self.p: D = None
        self.x: G = None
        self.o: G = None
        self.txt = txt

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

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

d = A("d")
n = B("n")
b = C("b")
m = D("m")
l = E("l")
i = F("i")
a = G("a")
h = D("h")
j = C("j")
k = E("k")

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