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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: C = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.o: B = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.r: D = None
        self.x: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: C = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.o: B = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.r: D = None
        self.x: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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