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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: B = None
        self.y: E = None
        self.u: H = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: H = None
        self.u: I = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.z: F = None
        self.y: I = None
        self.w: F = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: D = None
        self.v: A = None
        self.p: H = None
        self.txt = txt

f = A("f")
h = B("h")
a = C("a")
b = D("b")
c = E("c")
g = F("g")
l = G("l")
i = H("i")
m = I("m")
e = F("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: B = None
        self.y: E = None
        self.u: H = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: H = None
        self.u: I = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.z: F = None
        self.y: I = None
        self.w: F = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: D = None
        self.v: A = None
        self.p: H = None
        self.txt = txt

f = A("f")
h = B("h")
a = C("a")
b = D("b")
c = E("c")
g = F("g")
l = G("l")
i = H("i")
m = I("m")
e = F("e")

f.x = h
h.w = m
h.q = m
h.u = m
h.y = c
h.s = f
h.z = f
a.r = f
a.x = c
a.q = g
a.w = b
b.r = m
b.p = h
b.y = c
b.u = i
b.z = g
c.z = f
c.r = g
c.u = h
g.q = l
l.y = i
l.q = i
l.u = m
l.r = m
i.u = e
i.w = e
i.t = c
i.z = g
i.y = m
i.v = a
m.r = e
m.q = b
m.v = f
m.p = i
e.q = l
assert g.q.u.q.y.r.q.q.txt == "i"