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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: B = None
        self.w: E = None
        self.txt = txt

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

k.o = a
k.x = a
k.w = a
k.t = g
l.v = g
l.r = a
l.o = e
m.t = l
m.o = g
m.s = h
e.y = j
j.r = a
j.v = a
j.u = k
a.v = l
a.r = l
a.w = j
h.o = a
h.x = a
h.w = a
h.t = g
d.r = a
d.v = a
d.u = k
g.y = d
assert k.t.y.u.t.y.u.txt == "k"