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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: F = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: I = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.z: I = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: F = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: I = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.z: I = None
        self.w: D = None
        self.txt = txt

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

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

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

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