class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.p: H = None
        self.r: E = None
        self.q: I = None
        self.u: H = None
        self.y: F = None
        self.w: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.o: F = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: C = None
        self.x: F = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: B = None
        self.v: B = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.r: B = None
        self.t: I = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

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

l.x = h
l.y = h
l.z = b
l.s = b
l.p = k
l.u = k
l.r = n
l.q = f
l.w = e
g.q = d
g.r = k
g.z = k
g.o = h
j.r = f
j.y = b
j.u = b
j.w = l
j.o = d
b.t = k
n.v = l
n.y = j
n.x = h
n.s = f
e.y = h
e.r = l
d.r = n
d.y = n
d.p = g
d.v = g
k.p = d
k.x = j
k.r = g
k.w = g
k.t = f
k.z = n
f.z = l
f.t = l
f.y = b
h.y = e
h.r = l
assert h.r.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.p: H = None
        self.r: E = None
        self.q: I = None
        self.u: H = None
        self.y: F = None
        self.w: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.o: F = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: C = None
        self.x: F = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: B = None
        self.v: B = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.r: B = None
        self.t: I = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

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

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