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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: F = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: C = None
        self.v: D = None
        self.q: D = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: A = None
        self.t: C = None
        self.s: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: F = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: C = None
        self.v: D = None
        self.q: D = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: A = None
        self.t: C = None
        self.s: D = None
        self.u: A = None
        self.txt = txt

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

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

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