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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.y: F = None
        self.x: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.w: C = None
        self.y: A = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: F = None
        self.u: C = None
        self.x: D = None
        self.s: F = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: H = None
        self.q: F = None
        self.y: A = None
        self.x: F = None
        self.z: C = None
        self.o: H = None
        self.txt = txt

d = A("d")
e = B("e")
h = C("h")
m = D("m")
l = E("l")
a = F("a")
n = G("n")
b = H("b")
k = I("k")
c = D("c")

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.y: F = None
        self.x: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.w: C = None
        self.y: A = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: F = None
        self.u: C = None
        self.x: D = None
        self.s: F = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: H = None
        self.q: F = None
        self.y: A = None
        self.x: F = None
        self.z: C = None
        self.o: H = None
        self.txt = txt

d = A("d")
e = B("e")
h = C("h")
m = D("m")
l = E("l")
a = F("a")
n = G("n")
b = H("b")
k = I("k")
c = D("c")

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