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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: B = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: E = None
        self.v: E = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: B = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: E = None
        self.v: E = None
        self.x: C = None
        self.txt = txt

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

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

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

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