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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.z: E = None
        self.s: E = None
        self.w: D = None
        self.u: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: E = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.o: C = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.z: E = None
        self.s: E = None
        self.w: D = None
        self.u: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: E = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.o: C = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.txt = txt

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

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