class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: C = None
        self.p: D = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: I = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: E = None
        self.p: A = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: D = None
        self.r: B = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: I = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: E = None
        self.p: A = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: D = None
        self.r: B = None
        self.o: A = None
        self.txt = txt

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

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

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

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