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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.z: B = None
        self.x: A = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.u: A = None
        self.q: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.z: B = None
        self.x: A = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.u: A = None
        self.q: B = None
        self.x: C = None
        self.txt = txt

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

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

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