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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: D = None
        self.y: H = None
        self.q: I = None
        self.s: G = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: D = None
        self.y: H = None
        self.q: I = None
        self.s: G = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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