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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.z: F = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.u: G = None
        self.r: F = None
        self.y: D = None
        self.q: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.r: F = None
        self.o: B = None
        self.w: F = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.z: F = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.u: G = None
        self.r: F = None
        self.y: D = None
        self.q: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.r: F = None
        self.o: B = None
        self.w: F = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

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