class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.y: D = None
        self.r: E = None
        self.s: E = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: D = None
        self.t: G = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: C = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: D = None
        self.t: G = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: C = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

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

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

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

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