class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: G = None
        self.z: F = None
        self.q: C = None
        self.r: C = None
        self.s: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.z: G = None
        self.q: G = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.u: F = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

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

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

i = A("i")
k = B("k")
f = C("f")
l = D("l")
h = E("h")
m = F("m")
e = G("e")
g = B("g")

i.v = l
k.x = h
k.t = e
k.s = e
k.z = m
k.o = m
k.q = f
k.r = f
f.o = e
f.z = e
f.q = e
f.r = l
f.w = l
f.u = k
l.r = m
h.r = f
h.q = f
h.x = f
h.o = m
h.u = m
m.s = f
m.v = g
m.t = k
m.o = e
m.x = h
m.q = h
e.y = l
e.v = h
e.p = m
e.t = m
e.x = k
e.r = f
e.s = i
g.x = h
g.t = e
g.s = e
g.z = m
g.o = m
g.q = f
g.r = f
assert g.s.r.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: G = None
        self.z: F = None
        self.q: C = None
        self.r: C = None
        self.s: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.z: G = None
        self.q: G = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.u: F = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

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

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

i = A("i")
k = B("k")
f = C("f")
l = D("l")
h = E("h")
m = F("m")
e = G("e")
g = B("g")

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