class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.t: G = None
        self.v: G = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

i = A("i")
l = B("l")
e = C("e")
g = D("g")
c = E("c")
b = F("b")
n = G("n")

i.w = b
i.z = b
i.o = c
i.t = n
i.v = n
l.o = b
l.z = g
l.v = c
l.y = e
l.p = e
e.s = i
g.y = i
c.y = i
c.x = n
c.v = l
b.o = i
b.y = g
n.v = l
n.z = e
assert l.z.y.o.x.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.t: G = None
        self.v: G = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

i = A("i")
l = B("l")
e = C("e")
g = D("g")
c = E("c")
b = F("b")
n = G("n")

i.w = b
i.z = b
i.o = c
i.t = n
i.v = n
l.o = b
l.z = g
l.v = c
l.y = e
l.p = e
e.s = i
g.y = i
c.y = i
c.x = n
c.v = l
b.o = i
b.y = g
n.v = l
n.z = e
assert l.z.y.o.x.v.o.txt == "b"