class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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