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

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

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

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

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

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

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

a.q = l
a.s = j
a.x = h
a.w = i
a.r = b
a.o = g
j.y = b
g.x = d
g.w = i
g.z = j
g.q = l
g.o = m
l.z = b
l.v = m
i.s = h
i.v = h
i.r = d
i.w = j
m.t = a
m.p = g
m.v = h
m.y = i
d.x = g
d.w = i
d.z = j
d.q = l
d.o = m
b.z = l
b.v = m
h.q = b
h.s = j
h.x = a
h.w = i
h.r = l
h.o = d
assert i.w.y.v.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: B = None
        self.x: A = None
        self.w: E = None
        self.r: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

a.q = l
a.s = j
a.x = h
a.w = i
a.r = b
a.o = g
j.y = b
g.x = d
g.w = i
g.z = j
g.q = l
g.o = m
l.z = b
l.v = m
i.s = h
i.v = h
i.r = d
i.w = j
m.t = a
m.p = g
m.v = h
m.y = i
d.x = g
d.w = i
d.z = j
d.q = l
d.o = m
b.z = l
b.v = m
h.q = b
h.s = j
h.x = a
h.w = i
h.r = l
h.o = d
assert i.w.y.v.y.s.txt == "h"