class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: B = None
        self.v: D = None
        self.s: H = None
        self.z: H = None
        self.t: F = None
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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