class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: B = None
        self.x: E = None
        self.z: B = None
        self.w: B = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.r: E = None
        self.x: C = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

k = A("k")
m = B("m")
f = C("f")
a = D("a")
b = E("b")
g = F("g")
c = A("c")
h = F("h")
j = C("j")
e = C("e")

k.r = h
k.p = m
k.z = m
k.w = m
k.x = b
k.u = b
m.w = f
m.q = h
m.t = k
f.w = b
f.t = b
f.r = b
f.y = b
f.x = j
a.w = j
a.q = b
a.o = b
b.t = e
g.y = a
g.u = b
g.s = b
g.r = c
g.w = m
c.r = h
c.p = m
c.z = m
c.w = m
c.x = b
c.u = b
h.y = a
h.u = b
h.s = b
h.r = k
h.w = m
j.w = b
j.t = b
j.r = b
j.y = b
j.x = f
e.w = b
e.t = b
e.r = b
e.y = b
e.x = f
assert k.r.w.w.r.t.x.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: B = None
        self.x: E = None
        self.z: B = None
        self.w: B = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.r: E = None
        self.x: C = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

k = A("k")
m = B("m")
f = C("f")
a = D("a")
b = E("b")
g = F("g")
c = A("c")
h = F("h")
j = C("j")
e = C("e")

k.r = h
k.p = m
k.z = m
k.w = m
k.x = b
k.u = b
m.w = f
m.q = h
m.t = k
f.w = b
f.t = b
f.r = b
f.y = b
f.x = j
a.w = j
a.q = b
a.o = b
b.t = e
g.y = a
g.u = b
g.s = b
g.r = c
g.w = m
c.r = h
c.p = m
c.z = m
c.w = m
c.x = b
c.u = b
h.y = a
h.u = b
h.s = b
h.r = k
h.w = m
j.w = b
j.t = b
j.r = b
j.y = b
j.x = f
e.w = b
e.t = b
e.r = b
e.y = b
e.x = f
assert k.r.w.w.r.t.x.y.t.txt == "e"