class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: C = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: C = None
        self.s: A = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: A = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: G = None
        self.q: E = None
        self.y: G = None
        self.w: G = None
        self.x: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.z: E = None
        self.u: A = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

c = A("c")
b = B("b")
n = C("n")
j = D("j")
i = E("i")
l = F("l")
h = G("h")

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: C = None
        self.s: A = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: A = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: G = None
        self.q: E = None
        self.y: G = None
        self.w: G = None
        self.x: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.z: E = None
        self.u: A = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

c = A("c")
b = B("b")
n = C("n")
j = D("j")
i = E("i")
l = F("l")
h = G("h")

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