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

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

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

i = A("i")
g = B("g")
n = C("n")
l = A("l")
f = A("f")
d = C("d")
c = A("c")

i.t = l
i.u = l
i.y = d
g.o = l
g.t = f
g.r = d
n.v = l
l.t = i
l.u = i
l.y = n
f.t = l
f.y = d
f.u = c
d.v = f
c.t = l
c.u = l
c.y = n
assert d.v.y.v.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

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

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

i = A("i")
g = B("g")
n = C("n")
l = A("l")
f = A("f")
d = C("d")
c = A("c")

i.t = l
i.u = l
i.y = d
g.o = l
g.t = f
g.r = d
n.v = l
l.t = i
l.u = i
l.y = n
f.t = l
f.y = d
f.u = c
d.v = f
c.t = l
c.u = l
c.y = n
assert d.v.y.v.u.u.txt == "l"