class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: D = None
        self.r: G = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

m.u = a
j.z = b
k.v = c
k.r = i
c.w = l
c.v = b
c.r = k
a.z = l
a.t = j
a.p = j
a.u = k
a.y = k
l.r = c
d.u = j
i.y = c
b.x = k
b.q = k
b.v = c
b.r = d
b.p = m
assert j.z.p.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: D = None
        self.r: G = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

m.u = a
j.z = b
k.v = c
k.r = i
c.w = l
c.v = b
c.r = k
a.z = l
a.t = j
a.p = j
a.u = k
a.y = k
l.r = c
d.u = j
i.y = c
b.x = k
b.q = k
b.v = c
b.r = d
b.p = m
assert j.z.p.u.y.txt == "k"