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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.o: B = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.z: E = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.o: B = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: F = None
        self.z: E = None
        self.y: B = None
        self.txt = txt

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

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