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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: F = None
        self.u: D = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.u: F = None
        self.y: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: F = None
        self.u: D = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.u: F = None
        self.y: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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