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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.w: B = None
        self.y: B = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: C = None
        self.w: C = None
        self.u: A = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.w: B = None
        self.y: B = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: C = None
        self.w: C = None
        self.u: A = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

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

m.y = g
m.p = i
m.w = b
m.r = j
m.v = j
m.s = l
l.r = b
a.v = i
c.v = g
c.x = g
c.s = g
c.w = l
c.y = l
b.q = c
b.t = i
b.u = i
j.t = l
j.q = g
j.w = g
j.y = g
j.z = g
j.u = m
i.u = j
i.z = l
i.s = a
i.t = b
g.v = i
assert i.t.t.s.v.txt == "i"