class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: B = None
        self.v: G = None
        self.p: B = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: D = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

j = A("j")
a = B("a")
h = C("h")
l = D("l")
e = E("e")
g = F("g")
i = G("i")
c = C("c")
d = G("d")
m = E("m")

j.x = m
j.o = m
j.z = a
j.p = a
j.v = i
j.r = g
a.w = m
a.r = l
a.y = d
h.x = a
l.z = g
e.y = l
e.z = l
e.x = a
e.v = j
g.t = e
g.w = h
g.p = m
i.v = g
i.r = g
i.o = d
i.t = h
i.s = h
i.z = h
i.y = e
c.x = a
d.v = g
d.r = g
d.o = i
d.t = c
d.z = c
d.s = h
d.y = m
m.y = l
m.z = l
m.x = a
m.v = j
assert i.y.v.x.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: B = None
        self.v: G = None
        self.p: B = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: D = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

j = A("j")
a = B("a")
h = C("h")
l = D("l")
e = E("e")
g = F("g")
i = G("i")
c = C("c")
d = G("d")
m = E("m")

j.x = m
j.o = m
j.z = a
j.p = a
j.v = i
j.r = g
a.w = m
a.r = l
a.y = d
h.x = a
l.z = g
e.y = l
e.z = l
e.x = a
e.v = j
g.t = e
g.w = h
g.p = m
i.v = g
i.r = g
i.o = d
i.t = h
i.s = h
i.z = h
i.y = e
c.x = a
d.v = g
d.r = g
d.o = i
d.t = c
d.z = c
d.s = h
d.y = m
m.y = l
m.z = l
m.x = a
m.v = j
assert i.y.v.x.v.r.txt == "g"