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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: E = None
        self.u: E = None
        self.v: G = None
        self.r: H = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: B = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.u: D = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: F = None
        self.s: F = None
        self.w: E = None
        self.v: H = None
        self.txt = txt

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

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

c.x = m
e.p = m
e.z = d
e.u = d
e.v = i
e.r = g
e.w = j
n.q = j
n.s = e
n.r = k
n.u = c
b.v = g
b.r = k
d.s = b
j.q = k
i.w = c
i.o = d
i.u = b
i.v = k
m.r = i
m.o = j
m.s = j
m.w = d
m.v = g
k.r = i
k.p = i
g.r = i
g.o = j
g.s = j
g.w = d
g.v = m
assert i.w.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: E = None
        self.u: E = None
        self.v: G = None
        self.r: H = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: B = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.u: D = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: F = None
        self.s: F = None
        self.w: E = None
        self.v: H = None
        self.txt = txt

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

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

c.x = m
e.p = m
e.z = d
e.u = d
e.v = i
e.r = g
e.w = j
n.q = j
n.s = e
n.r = k
n.u = c
b.v = g
b.r = k
d.s = b
j.q = k
i.w = c
i.o = d
i.u = b
i.v = k
m.r = i
m.o = j
m.s = j
m.w = d
m.v = g
k.r = i
k.p = i
g.r = i
g.o = j
g.s = j
g.w = d
g.v = m
assert i.w.x.r.txt == "i"