class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: E = None
        self.w: E = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: B = None
        self.r: H = None
        self.u: A = None
        self.p: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: E = None
        self.w: E = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: B = None
        self.r: H = None
        self.u: A = None
        self.p: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

i.q = g
i.x = g
i.o = l
j.y = f
j.w = g
c.z = e
c.r = h
c.w = h
c.v = j
g.z = j
g.o = f
h.x = g
h.z = j
h.p = j
h.r = b
h.u = i
l.z = i
f.r = i
f.v = h
b.p = g
b.r = i
e.r = f
e.x = f
e.w = j
e.p = h
assert e.r.v.r.txt == "b"