class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: B = None
        self.w: A = None
        self.u: F = None
        self.z: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

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

k.s = c
k.w = c
k.z = c
k.q = h
k.u = g
h.y = i
h.p = e
h.v = e
h.w = j
h.z = l
h.q = l
l.x = e
l.t = e
l.z = e
l.w = c
l.p = h
j.s = i
j.r = l
e.p = g
e.o = j
g.w = i
c.s = k
c.w = k
c.z = k
c.q = h
c.u = g
i.s = j
i.r = l
b.y = j
b.p = e
b.v = e
b.w = i
b.z = l
b.q = l
assert g.w.s.r.p.y.r.t.p.txt == "g"