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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

i.y = c
i.u = f
i.x = n
i.z = a
i.v = l
i.w = b
i.t = e
a.z = c
b.w = i
b.x = i
b.s = g
l.v = g
l.r = i
l.z = f
n.o = f
g.o = e
g.r = b
g.s = a
f.s = n
c.v = g
c.r = e
c.z = f
e.y = l
e.u = f
e.x = n
e.z = a
e.v = c
e.w = b
e.t = i
assert l.z.s.o.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: G = None
        self.x: E = None
        self.z: B = None
        self.v: D = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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