class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: I = None
        self.q: C = None
        self.w: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: C = None
        self.z: B = None
        self.x: F = None
        self.u: G = None
        self.o: I = None
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.u: A = None
        self.s: D = None
        self.v: G = None
        self.x: C = None
        self.o: C = None
        self.r: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: C = None
        self.z: B = None
        self.x: F = None
        self.u: G = None
        self.o: I = None
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.u: A = None
        self.s: D = None
        self.v: G = None
        self.x: C = None
        self.o: C = None
        self.r: F = None
        self.y: H = None
        self.txt = txt

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

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