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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: F = None
        self.o: A = None
        self.x: G = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: F = None
        self.o: A = None
        self.x: G = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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