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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

g.t = a
g.p = a
g.y = a
d.s = l
i.v = d
i.o = g
a.r = d
a.v = d
a.u = i
a.s = e
a.y = e
e.x = g
e.r = l
c.p = e
j.s = g
m.v = j
m.o = l
l.t = a
l.p = a
l.y = a
assert j.s.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: D = None
        self.y: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

g.t = a
g.p = a
g.y = a
d.s = l
i.v = d
i.o = g
a.r = d
a.v = d
a.u = i
a.s = e
a.y = e
e.x = g
e.r = l
c.p = e
j.s = g
m.v = j
m.o = l
l.t = a
l.p = a
l.y = a
assert j.s.y.y.txt == "e"