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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: D = None
        self.y: F = None
        self.r: F = None
        self.w: A = None
        self.o: E = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: D = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: A = None
        self.t: I = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: G = None
        self.txt = txt

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

j.y = b
a.t = f
a.p = f
a.z = g
a.y = k
a.r = k
a.w = j
a.o = h
a.x = b
l.r = b
l.x = g
l.q = k
l.y = j
g.v = a
h.s = b
h.w = c
k.r = j
k.q = j
k.t = c
b.z = l
f.q = j
f.s = j
f.w = j
f.t = c
c.w = j
c.x = b
assert j.y.z.x.v.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: D = None
        self.y: F = None
        self.r: F = None
        self.w: A = None
        self.o: E = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: D = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: A = None
        self.t: I = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: G = None
        self.txt = txt

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

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