class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: B = None
        self.x: F = None
        self.q: C = None
        self.u: E = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: C = None
        self.o: D = None
        self.p: D = None
        self.r: C = None
        self.s: B = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: B = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: C = None
        self.o: D = None
        self.p: D = None
        self.r: C = None
        self.s: B = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: B = None
        self.s: H = None
        self.txt = txt

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

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

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

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

c.r = b
c.u = b
c.w = a
c.o = a
c.x = h
c.q = j
a.w = l
a.o = j
j.y = f
j.s = i
f.s = b
b.z = i
b.y = j
b.r = j
b.o = f
b.p = f
b.s = a
b.x = k
h.r = b
h.t = a
h.s = l
k.t = j
l.y = b
i.t = h
i.u = h
i.p = j
assert k.t.y.s.s.w.y.o.txt == "f"